home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / MacHacksBug / Python 1.5.2c1 / Mac / Contrib / PythonScript / ReadMe.txt < prev    next >
Encoding:
Text File  |  2000-06-23  |  2.5 KB  |  87 lines

  1.  
  2. PythonScript
  3. ------------
  4. v0.5 beta 1 24/04/98
  5.  
  6. author: Bill Bedford, <billb@mousa.demon.co.uk>
  7.  
  8. This suite of modules is a first attempt at writing a more user friendly 
  9. python/appleevent interface. The files in the suite are:
  10.  
  11. PythonScript
  12. ------------
  13.  
  14. Loads three dictionaries generated by getaete into __dict__'s of three 
  15. classes and thus gives us direct assess to all the methods in the aete.  
  16. Each method now contains all the information needed to build apple events.
  17.  
  18. The general usage is
  19.  
  20. >>>PythonScript.PsScript(SIGNATURE, TIMEOUT, IGNORING) 
  21.  
  22. where 
  23. SIGNATURE is the target application
  24. TIMEOUT is in ticks
  25. and IGNORING is a boolean and determines whether the script waits for a reply 
  26. from the target before going on to the next event 
  27.  
  28. >>>PythonScript.PyScript(Event, Object, keywdarg1..., keywdarg2...etc)
  29.  
  30. Object is a appleevent object specifier and is of the form
  31.  
  32. PythonScript.PsClass.Class1(arg).Class2(arg)….Property()
  33.  
  34. All applescript event, class and property names are capitalised to 
  35. distinguish them from python methods.
  36.  
  37. getaete
  38. -------
  39.  
  40. Reads the aete of the target application and returns it as a list of three 
  41. dictionaries, which represent all the events, properties and enumeration in 
  42. the aete.  (the fourth dictionary, comparisons, has never been implemented 
  43. in applescript so I have not used it) It also reads the applescript aeut 
  44. and adds any suites that are missing (ie where the application author has 
  45. set his suite to inherit from the aeut.)  and the applescript suite, which 
  46. gives the language methods
  47.  
  48. printaete
  49. ---------
  50.  
  51. Produces a text file with the aete set out in a human readable form, 
  52. similar to the Open Dictionary command in the applescript editor.
  53.  
  54.  
  55. baetools, baepack, baetypes
  56. ---------------------------
  57.  
  58. These are direct equivalents of aetools, aepack, aetypes in the standard 
  59. distribution.  Some methods and classes have been enhanced others are 
  60. redundant
  61.  
  62. PyScriptTest, testeudora
  63. ------------------------
  64.  
  65. A couple of test scripts.  Testeudora is an updated version of the one in 
  66. the standard distribution.
  67.      
  68.      
  69.      
  70.      
  71.      
  72. Still To Do (in no particular order)
  73. -----------
  74.  
  75. These modules are much slower than applescript.  I believe they could be 
  76. made faster by rewriting the aete parser in getaete and/or by putting in 
  77. some form of persistent storage so that the class dictionaries can be cached.
  78.      
  79. The parsing of the appleevent replies need rewriting.
  80.  
  81. Support for the use of scripting additions.
  82.  
  83. A Python aeut needs to be written, much of the applescript one is redundant 
  84. in python.
  85.  
  86. Probably a few other things I haven't thought of yet.
  87.